package com.jifen.common;

import com.jifen.dynamic.service.DynamicService;
import com.jifen.dynamic.vo.DynamicVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/h5")
public class HtmlController {

    @Autowired
    DynamicService dynamicService;

    @RequestMapping(value = "/dynamic/detail")
    public String dynamicDetail(int id, Model model) {
        DynamicVo dynamicVo = dynamicService.detail(id);
        model.addAttribute("dynamic", dynamicVo);
        return "dynamicDetail";
    }
}
